3.3.27 \(\int \frac {-3+2 x}{-x^2+x^3} \, dx\)

Optimal. Leaf size=16 \[ -\frac {3}{x}-\log (1-x)+\log (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1593, 77} \begin {gather*} -\frac {3}{x}-\log (1-x)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-3 + 2*x)/(-x^2 + x^3),x]

[Out]

-3/x - Log[1 - x] + Log[x]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {align*} \int \frac {-3+2 x}{-x^2+x^3} \, dx &=\int \frac {-3+2 x}{(-1+x) x^2} \, dx\\ &=\int \left (\frac {1}{1-x}+\frac {3}{x^2}+\frac {1}{x}\right ) \, dx\\ &=-\frac {3}{x}-\log (1-x)+\log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 16, normalized size = 1.00 \begin {gather*} -\frac {3}{x}-\log (1-x)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-3 + 2*x)/(-x^2 + x^3),x]

[Out]

-3/x - Log[1 - x] + Log[x]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {-3+2 x}{-x^2+x^3} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(-3 + 2*x)/(-x^2 + x^3),x]

[Out]

IntegrateAlgebraic[(-3 + 2*x)/(-x^2 + x^3), x]

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 18, normalized size = 1.12 \begin {gather*} -\frac {x \log \left (x - 1\right ) - x \log \relax (x) + 3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+2*x)/(x^3-x^2),x, algorithm="fricas")

[Out]

-(x*log(x - 1) - x*log(x) + 3)/x

________________________________________________________________________________________

giac [A]  time = 0.18, size = 16, normalized size = 1.00 \begin {gather*} -\frac {3}{x} - \log \left ({\left | x - 1 \right |}\right ) + \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+2*x)/(x^3-x^2),x, algorithm="giac")

[Out]

-3/x - log(abs(x - 1)) + log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.05, size = 15, normalized size = 0.94 \begin {gather*} \ln \relax (x )-\ln \left (x -1\right )-\frac {3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x-3)/(x^3-x^2),x)

[Out]

-ln(x-1)+ln(x)-3/x

________________________________________________________________________________________

maxima [A]  time = 1.62, size = 14, normalized size = 0.88 \begin {gather*} -\frac {3}{x} - \log \left (x - 1\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+2*x)/(x^3-x^2),x, algorithm="maxima")

[Out]

-3/x - log(x - 1) + log(x)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 14, normalized size = 0.88 \begin {gather*} 2\,\mathrm {atanh}\left (2\,x-1\right )-\frac {3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(2*x - 3)/(x^2 - x^3),x)

[Out]

2*atanh(2*x - 1) - 3/x

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 10, normalized size = 0.62 \begin {gather*} \log {\relax (x )} - \log {\left (x - 1 \right )} - \frac {3}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3+2*x)/(x**3-x**2),x)

[Out]

log(x) - log(x - 1) - 3/x

________________________________________________________________________________________